
var _XheList;

$(function () {
    init();
    bind();
    search();
});

var bind = function () {
    try {
        document.getElementById("spn_view_title").innerHTML = PROJECTNAME;
        Template.init("temp_source");
    }
    catch (e) { }
}

var init = function () {

    _XheList = new XheList();
    //_SearchModel.Methed = "DataCenterGet_1_0";
    _XheList.model.TableID = "tbl_Data";
    _XheList.model.ModalID = "div_Modal";
    _XheList.model.Title = "";
    _XheList.model.Table = "t_sys_source";
    _XheList.model.SortName = "id";
    _XheList.model.PrimaryKey = "id";
    _XheList.model.Button.Info = "详情";
    _XheList.model.Button.Show = "编辑";
    _XheList.model.Checked = false;
    _XheList.model.Number = true;
    _XheList.model.ClassName = "temp_source";
};

// 展示列表数据
var search = function () {

    try {

        _XheList.model.Columns = [
            ["name", "名称", "15", "", "C", "", true],
            ["remark", "描述", "35", "", "C", "", true],
            ["connection", "链接", "35", "", "D", "", true],
            ["id", "操作", "10", "null", "I", "", true]
        ];

        _XheList.search();
    } catch (e) {
        alert(e);
    }
};

var info = function (model, value, row, index) {
    try {
        
    }
    catch (e) {
        alert(e);
    }
};

var addShow = function () {
    try {

        _XheList.show();

    } catch (e) {

    }
}

var save = function () {
    try {
        //根据指定的ClassName自动获取表单数据,无需进行冗余的操作

        _XheList.edit();

    }
    catch (e) {
        alert(e);
    }
}

















